package com.jd.financeweb.controller;

import com.jd.financeweb.service.RepayService;
import com.jd.financeweb.service.impl.RepayServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/getCompOverDue")
public class OverRepayCompController extends HttpServlet {
    RepayService repayService=new RepayServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String cpNo=req.getParameter("cpNo");

        String response;

        response = repayService.getCompOverInfo(cpNo);


        resp.setCharacterEncoding("utf-8");
        resp.setContentType("text/html");

        PrintWriter out = resp.getWriter();

        out.println(response);
        out.flush();
        out.close();
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doPost(req, resp);
    }



}
